package cn.bon.emp.api.pojo.po;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.datatype.jsr310.deser.LocalDateTimeDeserializer;
import com.fasterxml.jackson.datatype.jsr310.ser.LocalDateTimeSerializer;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 员工详情
 * </p>
 *
 * @author luochao
 * @since 2023-12-08
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@Schema(description = "员工详情")
public class EmpDetails implements Serializable {

    private static final long serialVersionUID = 1L;

    /**
     * 员工id
     */
    @TableId(value = "emp_id")
    private Long empId;

    /**
     * 合同要素
     */
    @Schema(description = "合同要素")
    private String contract;

    /**
     * 培训情况
     */
    @Schema(description = "培训情况")
    private String train;

    /**
     * 休假情况
     */
    @Schema(description = "休假情况")
    private String vacation;

    /**
     * 业务能力
     */
    @Schema(description = "业务能力")
    private String businessAbility;

    /**
     * 工作偏好：0白班，1夜班
     */
    @Schema(description = "工作偏好：0白班，1夜班")
    private Integer preference;

    /**
     * 用工方式：0临时工，1正式工
     */
    @Schema(description = "用工方式：0临时工，1正式工")
    private Integer empMode;

    /**
     * 创建时间
     */
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime createTime;

    /**
     * 修改时间
     */
    @JsonIgnore
    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonDeserialize(using = LocalDateTimeDeserializer.class)		// 反序列化
    @JsonSerialize(using = LocalDateTimeSerializer.class)		// 序列化
    private LocalDateTime updateTime;

    /**
     * 删除标志位
     */
    @JsonIgnore
    private Integer delFlag = 0;


}
